#
# Be sure to run `pod lib lint ZLZKBaseUtils.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = 'ZLZKBaseUtils'
  s.version          = '1.0.2'
  s.summary          = '基于s-bridge扩展, 稳定版'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
                       扩展原生与h5交互功能,简化原生与h5开发
                       相配套的前端框架地址:`https://github.com/ionuv/s-bridge.git`
                       DESC

  s.homepage         = 'https://gitee.com/zlzk/ZLZKBaseUtils'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { '1134548344@qq.com' => '1134548344@qq.com' }
  s.source           = { :git => 'https://gitee.com/zlzk/ZLZKBaseUtils.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '11.0'
  s.xcconfig = {
#      bitcode设置为NO
    'ENABLE_BITCODE' => '$(inherited)'
#    'ENABLE_BITCODE' => 'NO'
  }
#  指定swift版本
  s.swift_versions = ['4']

#  s.public_header_files = 'ZLZKBaseUtils/Classes/ZLZKBaseBridge.h'
  s.source_files = 'ZLZKBaseUtils/Classes/*.{h,m}'
  s.dependency 'MBProgressHUD', '1.1.0'
  s.dependency 'SDWebImage', '5.12.1'
  s.dependency 'ZLPhotoBrowser', '4.3.8'
#  s.dependency 'ZLPhotoBrowser-objc', '1.0.4'
  s.dependency "SSZipArchive", '2.4.2' #解压缩文件

  s.subspec 'Utils' do |ss|
    ss.source_files = 'ZLZKBaseUtils/Classes/Utils/*.{h,m}'
  end
  s.subspec 'Protocol' do |ss|
    ss.dependency 'ZLZKBaseUtils/Utils'
    ss.source_files = 'ZLZKBaseUtils/Classes/Protocol/*.{h,m}'
  end
  s.subspec 'Dsbridge' do |ss|
    ss.source_files = 'ZLZKBaseUtils/Classes/Dsbridge/*.{h,m}'
  end
  s.subspec 'Ifly' do |ss|
#     ss.libraries道理一样我们是配置系统提供的一些库，比如我们要引用libz.tbd等，我们需要如下配置写法
#你可能要问为什么libz.tbd写成z,很简单这是一个规则要去除lib和后边的.tbd，如果遇到配置系统library就需要这么简写，记住就行了。

    ss.vendored_frameworks = 'ZLZKBaseUtils/Classes/Ifly/iflyMSC.framework'
    ss.libraries = 'c++', 'z', 'iconv'
    ss.frameworks = 'AVFoundation', 'SystemConfiguration', 'CoreTelephony', 'AudioToolbox', 'CoreLocation', 'Contacts', 'AddressBook', 'QuartzCore', 'CoreGraphics', 'Security'
    ss.pod_target_xcconfig = { 'VALID_ARCHS' => 'arm64 armv7 armv7s x86_64' }
    ss.dependency 'ZLZKBaseUtils/Utils'
    ss.dependency 'ZLZKBaseUtils/Dsbridge'
    ss.source_files = 'ZLZKBaseUtils/Classes/Ifly/*.{h,m}'
  end
  s.subspec 'Core' do |ss|
    ss.dependency 'ZLZKBaseUtils/Utils'
    ss.dependency 'ZLZKBaseUtils/Ifly'
    ss.dependency 'ZLZKBaseUtils/Dsbridge'
    ss.frameworks = 'MapKit', 'CoreLocation'
    ss.source_files = 'ZLZKBaseUtils/Classes/Core/*.{h,m}'
  end
  
#  s.resource_bundles = {
#    'ZLPhotoActionSheet' => ['ZLZKBaseUtils/Assets/*.{xib,png,xcassets}']
#  }

#  s.resource = ['ZLZKBaseUtils/Assets/*.{xib,wav,png,bundle,xcassets}']
  
   s.resource_bundles = {
     'ZLZKBaseUtils' => ['ZLZKBaseUtils/Assets/*']
   }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
  
  
#  需要注意的几个问题
#  1）一个就是如果有A subspec需要使用到其他的B subspec,就需要在A subspec下面添加对B subspec的依赖，这个依赖是针对subspec的，不需要写本地文件路劲
#  2）依赖其他第三方公开pod库的话，可以写在使用到的subspec里面，也可以写在总的依赖里
#  3）如果A subspec里面有使用到B subspec下的文件，B subspec又引用到A subspec下的文件，这样的话，分层实现起来比较困难，解决的思路可以在classes下面创建一个.h的头文件，引用各个头文件，并设置 s.souce_files = 'ZLZKBaseUtils/Classes/*.h'

#pod lib lint/repo push不支持i386编译
#本地代码库编译成功但是podspec文件验证时报不支持i386编译错误
#1）通过在 podspec 里面设置来绕过 i386 模拟器架构的编译。在 podspec 文件内加入以下代码
#
#  s.pod_target_xcconfig = { 'VALID_ARCHS' => 'arm64 armv7 armv7s x86_64' }
#pod lint 验证命令添加 --skip-import-validation 参数，lint 将跳过验证 pod 是否可以导入
#pod repo push 命令添加 --skip-import-validation 参数，push 将跳过验证 pod 是否可以导入。
#
#链接：https://www.jianshu.com/p/3b0638e2706e
end
